import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        redirect: '/cases'
    },
    {
        path: '/cases',
        name: 'Cases',
        component: () => import('../views/CaseList.vue')
    },
    {
        path: '/workbench',
        name: 'Workbench',
        component: () => import('../views/WorkbenchLayout.vue')
    },
    {
        path: '/templates',
        name: 'Templates',
        component: () => import('../views/workbench/TemplateManage.vue')
    },
    {
        path: '/settings/storage',
        name: 'StorageSettings',
        component: () => import('../views/settings/StorageSettings.vue')
    },
    {
        path: '/settings/logs',
        name: 'SystemLogs',
        component: () => import('../views/settings/SystemLogs.vue')
    },
    {
        path: '/settings/schema',
        name: 'SchemaManager',
        component: () => import('../views/settings/SchemaManager.vue')
    },
    {
        path: '/analysis/funds',
        name: 'FundsAnalysis',
        component: () => import('../views/workbench/FundsAnalysis.vue')
    }
]

const router = createRouter({
    history: createWebHashHistory(), // Use Hash history for Electron
    routes
})

export default router
